/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package id3;

import java.util.ArrayList;

/**
 *
 * @author SONY VAIO
 */
public class Node {
    public Node parent;
    public Node[] children;
    public ArrayList<Record> data;
    public double entropy;
    public boolean isUsed;
    public int childrenCount;
    public String arrowName;
    public String rootName;
    public String className;
    public ArrayList<Integer> usedAttributes_id;
    //public Attribute testAttribute;

    public Node(){
        this.data = new ArrayList<Record>();
        this.entropy = 0.0;
        this.parent = null;
        this.children = null;
        this.isUsed = false;
        this.childrenCount = 0;
        this.arrowName = "";
        this.rootName = "";
        this.className = "";
        usedAttributes_id = new ArrayList<Integer>();
        //this.testAttribute = new Attribute("", "");
    }

    public void PrintNode(){
        if(this.parent == null){
            System.out.print(this.rootName + " ");
        }else{
            System.out.print(this.arrowName);
            System.out.println();
            System.out.print("   " + this.rootName + " = ");
        }
        
        if(!this.className.equalsIgnoreCase("")){
            System.out.println(" : " + this.className);
            System.out.print(this.parent.rootName + " = ");
        }


        /*if(this.arrowName.equalsIgnoreCase("")){
            System.out.print(this.rootName + " = ");
        }else{
            System.out.print(this.arrowName);
            System.out.println();
            System.out.print("   " + this.rootName + " = ");
        }

        if(!this.className.equalsIgnoreCase("")){
            System.out.println(" : " + this.className);
        }*/
    }

    
}
